/**
 * 
 */
package org.going.invoker;

import javax.servlet.http.HttpServletRequest;

/**
 * @author ferendo.huang@gmail.com
 * 
 */
public interface ParamValueGenerator
{
	/**
	 * The implementation will generate a key to get the value in request, the
	 * key will be like this : 1, 2.field1,
	 * 4.field2, 5[], 6[], 7[0](set the array length), 7[0].field1, 7[1].field1...
	 * Generic array will be generate by Servlet
	 * 
	 * @param index : the index of parameter in method
	 * @param clazz : parameter type
	 * @param request : HttpServletRequest
	 * @return Object of parameter value
	 * @throws ParamValueGenerateException
	 */
	Object generate(String index, Class<?> clazz, HttpServletRequest request) throws ParamValueGenerateException;
}
